<html>
<head><meta charset="utf-8"><title>Adding roots to a Vfs · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Adding.20roots.20to.20a.20Vfs.html">Adding roots to a Vfs</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="192683127"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Adding%20roots%20to%20a%20Vfs/near/192683127" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Tadeo Kondrak <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Adding.20roots.20to.20a.20Vfs.html#192683127">(Apr 02 2020 at 15:30)</a>:</h4>
<p>Is it intentional that new roots can't be added to a ra_vfs::Vfs after creation? I'm playing around with possibly writing a Kakoune "plugin" for rust-analyzer, where there would only be one server for multiple projects, so adding roots to an existing Vfs could be useful. It's possible I'm just missing something obvious, since I haven't learned much about how all of rust-analyzer fits together.</p>



<a name="192683432"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Adding%20roots%20to%20a%20Vfs/near/192683432" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Adding.20roots.20to.20a.20Vfs.html#192683432">(Apr 02 2020 at 15:32)</a>:</h4>
<p><a href="https://github.com/rust-analyzer/rust-analyzer/issues/3715" title="https://github.com/rust-analyzer/rust-analyzer/issues/3715">https://github.com/rust-analyzer/rust-analyzer/issues/3715</a></p>



<a name="192683495"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Adding%20roots%20to%20a%20Vfs/near/192683495" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Adding.20roots.20to.20a.20Vfs.html#192683495">(Apr 02 2020 at 15:32)</a>:</h4>
<p>srry for short reply, doing other stufff rn</p>



<a name="192684114"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Adding%20roots%20to%20a%20Vfs/near/192684114" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Tadeo Kondrak <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Adding.20roots.20to.20a.20Vfs.html#192684114">(Apr 02 2020 at 15:36)</a>:</h4>
<p>Thanks, I'll probably just find the root manually and create a Vfs individually for each project to start then.</p>



<a name="192685684"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Adding%20roots%20to%20a%20Vfs/near/192685684" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> std::Veetaha <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Adding.20roots.20to.20a.20Vfs.html#192685684">(Apr 02 2020 at 15:46)</a>:</h4>
<p>Are you talking about using a single server process for multiple disconnected project folders? I know at least one blocker for implementing this. We cannot share the cargo check watcher between them right now...</p>



<a name="192686564"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Adding%20roots%20to%20a%20Vfs/near/192686564" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Tadeo Kondrak <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Adding.20roots.20to.20a.20Vfs.html#192686564">(Apr 02 2020 at 15:52)</a>:</h4>
<p>It's the same process, but they don't actually have to share any analysis state between projects. I was trying to share the Vfs since it was relatively low-level, but there's no actual need to, I think.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>